********************************************************************************
********************************************************************************
* LEWIS-BECK AND QUINLAN 
* A POLITICAL HISTORY FORECAST OF THE 2024 US CONGRESSIONAL ELECTIONS  
* ANALYSIS SYNTAX FILE (Including analysis detailed in the paper appendixes)
* Last updated: Wednesday August 14, 2024
********************************************************************************


********************************************************************************
********************************************************************************
* SYNTAX FILE TABLE OF CONTENTS
* #>>>  1: INSTRUCTIONS FOR USE OF SYNTAX FILE, PURPOSE OF SYNTAX FILE
**         GET DATA, & STATA SETUP FOR TIME SERIES 
* #>>>  2: SENATE: DEM RAW SEATS TOTAL POLITICAL HISTORY MODEL 
* #>>>  3: HOUSE OF REP: DEM RAW SEATS TOTAL POLITICAL HISTORY MODEL 
**#>>>  4: APPENDIX A: SUMMARY STATISTICS, CORRELATIONS, AND PLOTS
**#>>>  5: APPENDIX C: SUPPLEMENTARY ANALYSIS I - ROBUSTNESS MODEL CHECKS 
* #>>>  6: APPENDIX C: SUPPLEMENTARY ANALYSIS II - OUT-OF-SAMPLE TESTS 
**         JACKKNIFE APPROACH    
**#>>>  7: APPENDIX C: SUPPLEMENTARY ANALYSIS III - OUT-OF-SAMPLE TESTS 
**         ONE-STEP-AHEAD APPROACH
**#>>>  8: APPENDIX C: SUPPLEMENTARY ANALYSIS IV - WITHIN-SAMPLE ELECTION BY 
**         ELECTION FORECASTS
********************************************************************************
********************************************************************************


********************************************************************************
********************************************************************************
**#>>> 1: INSTRUCTIONS FOR USE OF SYNTAX FILE, PURPOSE OF SYNTAX FILE
**        GET DATA, & STATA SETUP FOR TIME SERIES 
********************************************************************************
********************************************************************************

********************************************************************************
** >>> 1.1 INSTRUCTIONS FOR USE OF AND NAVIGATING FILE & PURPOSE OF THE FILE
********************************************************************************
* #>>>  = SECTION HEADER 
* *///  = ANALYSIS HEADER
** *>>> = SUB ANALYSIS HEADER
** *### = ADDITIONAL INSTRUCTIONS OR INFORMATION

* This do-file serves to operationalize and append a series of variables relevant
* to the analysis reported in Lewis-Beck and Quinlan "2024 US Congressional 
* Election Forecast"


********************************************************************************
** >>> 1.2 SETUP STATA, GET DATA, AND SETUP FOR TIME SERIES
********************************************************************************

*/// Make sure no other data in STATA 
clear all 


*/// Open Dataset (ACHTUNG: May require path change)
 use "C:\Users\quinlasn\Desktop\Research\Forecasting\Forecasting_USA\2024_Forecasting_HoR & Senate Models USA\Paper\Re-Submission_202408\Dataverse Deposit.dta"


*/// Set time variable 
tset Election_ID1


********************************************************************************
********************************************************************************
**#>>> 2: SENATE: DEM RAW SEATS TOTAL
**        POLITICAL HISTORY MODEL 
********************************************************************************
********************************************************************************

*///  Regression Model & Information Criteria for Model Comparison (Table 1 in Paper, Column 1 Senate Model)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA  
estat ic                                                                                                                        


********************************************************************************
********************************************************************************
**#>>> 3: HOUSE OF REP: DEM RAW SEATS TOTAL 
**        POLITICAL HISTORY MODEL 
********************************************************************************
********************************************************************************

*///  Regression Model & Information Criteria for Model Comparison (Table 1 in Paper, Column 2 House Model)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94  
estat ic                                                                                                                       


********************************************************************************
********************************************************************************
**#>>> 4: APPENDIX A: SUMMARY STATISTICS, CORRELATIONS, AND PLOTS
********************************************************************************
********************************************************************************

********************************************************************************
**>>> 4.1 SUMMARY STATS (Table A1, Appendix A)
********************************************************************************

summarize Senate_TotalSeats_DEM HoR_Seats_DEM  Governor_DEM Dominance_DEM2 Senate_SeatsNotUp_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_PostVRA Election_Post94 Century21 COVID2 Trump2 


********************************************************************************
**>>> 4.2 BIVARIATE CORRELATIONS - SENATE MODEL
**     (TABLE A2, Appendix A)
********************************************************************************

corr Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA  


********************************************************************************
**>>> 4.3 BIVARIATE CORRELATIONS - HOUSE OF REPRESENTATIVES MODEL
**     (TABLE A3, Appendix A)
********************************************************************************

corr HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94  


********************************************************************************
**>>> 4.4 TOTAL N SEATS FOR THE DEMOCRATS IN US SENATE & HOUSE 1946-2022 
**     (FIGURES A1 & A2, Appendix A) 
**     Figures created in Excel. 
********************************************************************************


********************************************************************************
**>>> 4.5 PLOT - SENATE: DEM RAW SEATS HISTOGRAM & KERNAL DENSITY PLOT
**     (FIGURE A3 in Appendix A)
********************************************************************************

histogram Senate_TotalSeats_DEM, frequency fcolor(blue) lcolor(black) gap(4) addlabel addlabopts(mlabsize(medium) mlabcolor(blue)) normal normopts(lcolor(brown) lwidth(medthick) lpattern(dash_dot)) kdensity kdenopts(lcolor(teal) lwidth(medthick)) ylabel(, glcolor(gs7) glpattern(dash)) legend(on) scheme(economist)


********************************************************************************
**>>> 4.6 PLOT - HOUSE OF REP: DEM RAW SEATS HISTOGRAM & KERNAL DENSITY PLOT
**     (FIGURE A4 in Appendix A)
********************************************************************************

histogram HoR_Seats_DEM, frequency fcolor(blue) lcolor(black) gap(4) addlabel addlabopts(mlabsize(medium) mlabcolor(blue)) normal normopts(lcolor(brown) lwidth(medthick) lpattern(dash_dot)) kdensity kdenopts(lcolor(teal) lwidth(medthick)) ylabel(, glcolor(gs7) glpattern(dash)) legend(on) scheme(economist)


********************************************************************************
********************************************************************************
**#>>> 5: APPENDIX C: SUPPLEMENTARY ANALYSIS I - ROBUSTNESS MODEL CHECKS 
********************************************************************************
********************************************************************************


********************************************************************************
**>>> 5.1: SENATE & HOUSE OF REP MODELS - 21ST CENTURY CONTROL
**    (TABLE C1 in Appendix C)
********************************************************************************


*///  SENATE: Regression Model (Table C1, Column 1)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA Century21
estat ic                                                                                                                      
estat dwatson  


*///  HOUSE OF REP: Regression Model (Table C1, Column 2 House Model)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 Century21
estat ic                                                                                                                       
estat dwatson 


********************************************************************************
**>>> 5.2: SENATE & HOUSE OF REP MODELS - COVID-19 PHENOMENON
**    (TABLE C2 in Appendix C)
********************************************************************************

*///  SENATE: Regression Model (Table C2, Column 1)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA COVID2
estat ic                                                                                                                      
estat dwatson  


*///  HOUSE OF REP: Regression Model (Table C2, Column 2 House Model)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 COVID2
estat ic                                                                                                                       
estat dwatson 


********************************************************************************
**>>> 5.3: SENATE & HOUSE OF REP MODELS - TRUMP PHENOMENON
**    (TABLE C3 in Appendix C)
********************************************************************************


*///  SENATE: Regression Model (Table C3, Column 1)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA Trump2
estat ic                                                                                                                      
estat dwatson  


*///  HOUSE OF REP: Regression Model (Table C3, Column 2 House Model)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 Trump2
estat ic                                                                                                                       
estat dwatson 


********************************************************************************
**>>> 5.4: SENATE & HOUSE OF REP - NAIVE MODELS WITH PREVIOUS SEAT N AS SOLE CONTROL
**    (TABLE C4 in Appendix C)
********************************************************************************

*///  SENATE: Regression Model (Table C4, Column 1)
reg Senate_TotalSeats_DEM Senate_TotalSeats_DEM_prevelec
estat ic                                                                                                                       
estat dwatson  


*///  HOUSE OF REP: Regression Model (Table C4, Column 2 House Model)
reg HoR_Seats_DEM HoR_Seats_DEM_prevelec
estat ic                                                                                                                       
estat dwatson 


********************************************************************************
********************************************************************************
**#>>> 6: APPENDIX C: SUPPLEMENTARY ANALYSIS II - OUT-OF-SAMPLE TESTS 
**        JACKKNIFE APPROACH
********************************************************************************
********************************************************************************


********************************************************************************
** >>> 6.1: SENATE: DEM RAW SEATS TOTAL
**          OUT-OF-SAMPLE TESTS: JACKKNIFE APPROACH
**          (Some of the information from these models detailed in 
**           TABLE C6, Appendix C)
********************************************************************************				  
				  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2022 (variable: JKNF_Election_2022)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2022==1
estat ic                                                                                                                        
predict JKNFElec22Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec22Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
				  

*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2020 (variable: JKNF_Election_2020)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2020==1
estat ic                                                                                                                        
predict JKNFElec20Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec20Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
				  

*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2018 (variable: JKNF_Election_2018)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2018==1
estat ic                                                                                                                        
predict JKNFElec18Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec18Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
				  

*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2016 (variable: JKNF_Election_2016)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2016==1
estat ic                                                                                                                        
predict JKNFElec16Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec16Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
				  

*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2014 (variable: JKNF_Election_2014)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2014==1
estat ic                                                                                                                        
predict JKNFElec14Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec14Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
								  				  
												  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2012 (variable: JKNF_Election_2012)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2012==1
estat ic                                                                                                                        
predict JKNFElec12Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec12Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
								  				  
												  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2010 (variable: JKNF_Election_2010)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2010==1
estat ic                                                                                                                        
predict JKNFElec10Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec10Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
								  				  
												  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2008 (variable: JKNF_Election_2008)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2008==1
estat ic                                                                                                                        
predict JKNFElec08Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec08Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)				  
								  				  
												  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2006 (variable: JKNF_Election_2006)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2006==1
estat ic                                                                                                                        
predict JKNFElec06Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec06Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)

								  				  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2004 (variable: JKNF_Election_2004)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2004==1
estat ic                                                                                                                        
predict JKNFElec04Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec04Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)						  

								  				  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2002 (variable: JKNF_Election_2002)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2002==1
estat ic                                                                                                                        
predict JKNFElec02Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec02Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)						  

								  				  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2000 (variable: JKNF_Election_2000)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_2000==1
estat ic                                                                                                                        
predict JKNFElec00Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec00Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1998 (variable: JKNF_Election_1998)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1998==1
estat ic                                                                                                                        
predict JKNFElec98Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec98Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1996 (variable: JKNF_Election_1996)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1996==1
estat ic                                                                                                                        
predict JKNFElec96Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec96Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)																				  				  


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1994 (variable: JKNF_Election_1994)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1994==1
estat ic                                                                                                                        
predict JKNFElec94Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec94Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)								  				  


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1992 (variable: JKNF_Election_1992)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1992==1
estat ic                                                                                                                        
predict JKNFElec92Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec92Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)								  				  


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1990 (variable: JKNF_Election_1990)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1990==1
estat ic                                                                                                                        
predict JKNFElec90Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec90Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1988 (variable: JKNF_Election_1988)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1988==1
estat ic                                                                                                                        
predict JKNFElec88Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec88Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1986 (variable: JKNF_Election_1986)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1986==1
estat ic                                                                                                                        
predict JKNFElec86Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec86Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1984 (variable: JKNF_Election_1984)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1984==1
estat ic                                                                                                                        
predict JKNFElec84Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec84Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1982 (variable: JKNF_Election_1982)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1982==1
estat ic                                                                                                                        
predict JKNFElec82Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec82Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1980 (variable: JKNF_Election_1980)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1980==1
estat ic                                                                                                                        
predict JKNFElec80Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec80Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1978 (variable: JKNF_Election_1978)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1978==1
estat ic                                                                                                                        
predict JKNFElec78Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec78Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1976 (variable: JKNF_Election_1976)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1976==1
estat ic                                                                                                                        
predict JKNFElec76Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec76Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1974 (variable: JKNF_Election_1974)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1974==1
estat ic                                                                                                                        
predict JKNFElec74Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec74Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1972 (variable: JKNF_Election_1972)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1972==1
estat ic                                                                                                                        
predict JKNFElec72Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec72Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1970 (variable: JKNF_Election_1972)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1970==1
estat ic                                                                                                                        
predict JKNFElec70Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec70Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1968 (variable: JKNF_Election_1968)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1968==1
estat ic                                                                                                                        
predict JKNFElec68Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec68Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1966 (variable: JKNF_Election_1966)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1966==1
estat ic                                                                                                                        
predict JKNFElec66Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec66Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1964 (variable: JKNF_Election_1964)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1964==1
estat ic                                                                                                                        
predict JKNFElec64Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec64Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1962 (variable: JKNF_Election_1962)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1962==1
estat ic                                                                                                                        
predict JKNFElec62Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec62Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1960 (variable: JKNF_Election_1960)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1960==1
estat ic                                                                                                                        
predict JKNFElec60Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec60Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1958 (variable: JKNF_Election_1958)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1958==1
estat ic                                                                                                                        
predict JKNFElec58Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec58Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1956 (variable: JKNF_Election_1956)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1956==1
estat ic                                                                                                                        
predict JKNFElec56Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec56Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1954 (variable: JKNF_Election_1954)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1954==1
estat ic                                                                                                                        
predict JKNFElec54Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec54Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1952 (variable: JKNF_Election_1952)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1952==1
estat ic                                                                                                                        
predict JKNFElec52Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec52Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1950 (variable: JKNF_Election_1950)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1950==1
estat ic                                                                                                                        
predict JKNFElec50Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec50Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1948 (variable: JKNF_Election_1948)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1948==1
estat ic                                                                                                                        
predict JKNFElec48Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec48Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1946 (variable: JKNF_Election_1946)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if JKNF_Election_1946==1
estat ic                                                                                                                        
predict JKNFElec46Sen_TotalSeatsDEM_yhat, xb
tabstat JKNFElec46Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


********************************************************************************
** >>> 6.2: HOUSE OF REPS: DEM RAW SEATS TOTAL
**          OUT-OF-SAMPLE TESTS: JACKKNIFE APPROACH
**          (Some of the information from these models detailed in 
**           TABLE C7, Appendix C)
********************************************************************************				  
		
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2022 (variable: JKNF_Election_2022)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2022==1
estat ic 			                                                                                                                         
predict JKNFElec22HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec22HoR, by(ElectionDate_Y)				  

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2020 (variable: JKNF_Election_2020)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2020==1
estat ic 			                                                                                                                         
predict JKNFElec20HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec20HoR, by(ElectionDate_Y)				  

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2018 (variable: JKNF_Election_2018)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2018==1
estat ic 			                                                                                                                         
predict JKNFElec18HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec18HoR, by(ElectionDate_Y)		

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2016 (variable: JKNF_Election_2016)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2016==1
estat ic 			                                                                                                                         
predict JKNFElec16HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec16HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2014 (variable: JKNF_Election_2014)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2014==1
estat ic 			                                                                                                                         
predict JKNFElec14HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec14HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2012 (variable: JKNF_Election_2012)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2012==1
estat ic 			                                                                                                                         
predict JKNFElec12HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec12HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2010 (variable: JKNF_Election_2010)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2010==1
estat ic 			                                                                                                                         
predict JKNFElec10HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec10HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2008 (variable: JKNF_Election_2008)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2008==1
estat ic 			                                                                                                                         
predict JKNFElec08HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec08HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2006 (variable: JKNF_Election_2006)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2006==1
estat ic 			                                                                                                                         
predict JKNFElec06HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec06HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2006 (variable: JKNF_Election_2004)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2004==1
estat ic 			                                                                                                                         
predict JKNFElec04HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec04HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2002 (variable: JKNF_Election_2002)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2002==1
estat ic 			                                                                                                                         
predict JKNFElec02HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec02HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 2000 (variable: JKNF_Election_2000)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_2000==1
estat ic 			                                                                                                                         
predict JKNFElec00HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec00HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1998 (variable: JKNF_Election_1998)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1998==1
estat ic 			                                                                                                                         
predict JKNFElec98HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec98HoR, by(ElectionDate_Y)	

  
*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1996 (variable: JKNF_Election_1996)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1996==1
estat ic 			                                                                                                                         
predict JKNFElec96HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec96HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1994 (variable: JKNF_Election_1994)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1994==1
estat ic 			                                                                                                                         
predict JKNFElec94HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec94HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1992 (variable: JKNF_Election_1992)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1992==1
estat ic 			                                                                                                                         
predict JKNFElec92HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec92HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1990 (variable: JKNF_Election_1990)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1990==1
estat ic 			                                                                                                                         
predict JKNFElec90HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec90HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1988 (variable: JKNF_Election_1988)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1988==1
estat ic 			                                                                                                                         
predict JKNFElec88HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec88HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1986 (variable: JKNF_Election_1986)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1986==1
estat ic 			                                                                                                                         
predict JKNFElec86HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec86HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1984 (variable: JKNF_Election_1984)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1984==1
estat ic 			                                                                                                                         
predict JKNFElec84HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec84HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1982 (variable: JKNF_Election_1982)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1982==1
estat ic 			                                                                                                                         
predict JKNFElec82HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec82HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1980 (variable: JKNF_Election_1980)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1980==1
estat ic 			                                                                                                                         
predict JKNFElec80HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec80HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1978 (variable: JKNF_Election_1978)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1978==1
estat ic 			                                                                                                                         
predict JKNFElec78HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec78HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1976 (variable: JKNF_Election_1976)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1976==1
estat ic 			                                                                                                                         
predict JKNFElec76HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec76HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1974 (variable: JKNF_Election_1974)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1974==1
estat ic 			                                                                                                                         
predict JKNFElec74HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec74HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1972 (variable: JKNF_Election_1972)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1972==1
estat ic 			                                                                                                                         
predict JKNFElec72HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec72HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1970 (variable: JKNF_Election_1970)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1970==1
estat ic 			                                                                                                                         
predict JKNFElec70HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec70HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1968 (variable: JKNF_Election_1968)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1968==1
estat ic 			                                                                                                                         
predict JKNFElec68HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec68HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1966 (variable: JKNF_Election_1966)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1966==1
estat ic 			                                                                                                                         
predict JKNFElec66HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec66HoR, by(ElectionDate_Y)	


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1964 (variable: JKNF_Election_1964)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1964==1
estat ic 			                                                                                                                         
predict JKNFElec64HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec64HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1962 (variable: JKNF_Election_1962)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1962==1
estat ic 			                                                                                                                         
predict JKNFElec62HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec62HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1960 (variable: JKNF_Election_1960)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1960==1
estat ic 			                                                                                                                         
predict JKNFElec60HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec60HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1958 (variable: JKNF_Election_1958)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1958==1
estat ic 			                                                                                                                         
predict JKNFElec58HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec58HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1956 (variable: JKNF_Election_1956)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1956==1
estat ic 			                                                                                                                         
predict JKNFElec56HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec56HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1954 (variable: JKNF_Election_1954)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1954==1
estat ic 			                                                                                                                         
predict JKNFElec54HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec54HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1952 (variable: JKNF_Election_1952)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1952==1
estat ic 			                                                                                                                         
predict JKNFElec52HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec52HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1950 (variable: JKNF_Election_1950)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1950==1
estat ic 			                                                                                                                         
predict JKNFElec50HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec50HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1948 (variable: JKNF_Election_1948)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1948==1
estat ic 			                                                                                                                         
predict JKNFElec48HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec48HoR, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: Jacknife test excl 1946 (variable: JKNF_Election_1946)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if JKNF_Election_1946==1
estat ic 			                                                                                                                         
predict JKNFElec46HoR_TotalSeatsDEM_yhat, xb
tabstat JKNFElec46HoR, by(ElectionDate_Y)


********************************************************************************
********************************************************************************
**#>>> 7: APPENDIX C: SUPPLEMENTARY ANALYSIS III - OUT-OF-SAMPLE TESTS 
**        ONE-STEP-AHEAD APPROACH
********************************************************************************
********************************************************************************

********************************************************************************
** >>> 7.1: SENATE: DEM RAW SEATS TOTAL
**          OUT-OF-SAMPLE TESTS: ONE-STEP-AHEAD APPROACH
**          (Some of the information from these models detailed in 
**           TABLE C8, Appendix C)
********************************************************************************				  
	

*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2022 - Excl. 2022 (variable: StpAhead_Election_2022)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2022==1
estat ic                                                                                                                        
predict SAElec22Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec22Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2020 - Excl. 2020-2022 (variable: StpAhead_Election_2020)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2020==1
estat ic                                                                                                                        
predict SAElec20Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec20Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2018 - Excl. 2018-2022 (variable: StpAhead_Election_2018)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2018==1
estat ic                                                                                                                        
predict SAElec18Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec18Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2016 - Excl. 2016-2022 (variable: StpAhead_Election_2016)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2016==1
estat ic                                                                                                                        
predict SAElec16Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec16Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2014 - Excl. 2014-2022 (variable: StpAhead_Election_2014)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2014==1
estat ic                                                                                                                        
predict SAElec14Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec14Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2012 - Excl. 2012-2022 (variable: StpAhead_Election_2012)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2012==1
estat ic                                                                                                                        
predict SAElec12Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec12Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2010 - Excl. 2010-2022 (variable: StpAhead_Election_2010)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2010==1
estat ic                                                                                                                        
predict SAElec10Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec10Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2008 - Excl. 2008-2022 (variable: StpAhead_Election_2008)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2008==1
estat ic                                                                                                                        
predict SAElec08Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec08Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2006 - Excl. 2006-2022 (variable: StpAhead_Election_2006)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2006==1
estat ic                                                                                                                        
predict SAElec06Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec06Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2004 - Excl. 2004-2022 (variable: StpAhead_Election_2004)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2004==1
estat ic                                                                                                                        
predict SAElec04Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec04Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2002 - Excl. 2002-2022 (variable: StpAhead_Election_2002)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2002==1
estat ic                                                                                                                        
predict SAElec02Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec02Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2000 - Excl. 2000-2022 (variable: StpAhead_Election_2000)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_2000==1
estat ic                                                                                                                        
predict SAElec00Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec00Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1998 - Excl. 1998-2022 (variable: StpAhead_Election_1998)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1998==1
estat ic                                                                                                                        
predict SAElec98Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec98Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1996 - Excl. 1996-2022 (variable: StpAhead_Election_1996)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1996==1
estat ic                                                                                                                        
predict SAElec96Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec96Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1994 - Excl. 1994-2022 (variable: StpAhead_Election_1994)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1994==1
estat ic                                                                                                                        
predict SAElec94Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec94Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1992 - Excl. 1992-2022 (variable: StpAhead_Election_1992)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1992==1
estat ic                                                                                                                        
predict SAElec92Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec92Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1990 - Excl. 1990-2022 (variable: StpAhead_Election_1990)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1990==1
estat ic                                                                                                                        
predict SAElec90Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec90Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1988 - Excl. 1988-2022 (variable: StpAhead_Election_1988)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1988==1
estat ic                                                                                                                        
predict SAElec88Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec88Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1986 - Excl. 1986-2022 (variable: StpAhead_Election_1986)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1986==1
estat ic                                                                                                                        
predict SAElec86Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec86Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1984 - Excl. 1984-2022 (variable: StpAhead_Election_1984)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1984==1
estat ic                                                                                                                        
predict SAElec84Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec84Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1982 - Excl. 1982-2022 (variable: StpAhead_Election_1982)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1982==1
estat ic                                                                                                                        
predict SAElec82Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec82Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1980 - Excl. 1980-2022 (variable: StpAhead_Election_1980)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1980==1
estat ic                                                                                                                        
predict SAElec80Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec80Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1978 - Excl. 1978-2022 (variable: StpAhead_Election_1978)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1978==1
estat ic                                                                                                                        
predict SAElec78Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec78Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)

		
*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1976 - Excl. 1976-2022 (variable: StpAhead_Election_1976)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1976==1
estat ic                                                                                                                        
predict SAElec76Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec76Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1974 - Excl. 1974-2022 (variable: StpAhead_Election_1974)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1974==1
estat ic                                                                                                                        
predict SAElec74Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec74Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1972 - Excl. 1972-2022 (variable: StpAhead_Election_1972)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA if StpAhead_Election_1972==1
estat ic                                                                                                                        
predict SAElec72Sen_TotalSeatsDEM_yhat, xb
tabstat SAElec72Sen_TotalSeatsDEM_yhat, by(ElectionDate_Y)


********************************************************************************
** >>> 7.2: HOUSE OF REPS: DEM RAW SEATS TOTAL
**          OUT-OF-SAMPLE TESTS: ONE-STEP-AHEAD APPROACH
**          (Some of the information from these models detailed in 
**           TABLE C9, Appendix C)
********************************************************************************				  
		

*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2022 - Excl. 2022 (variable: StpAhead_Election_2022)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2022==1
estat ic 			                                                                                                                         
predict SAElec22HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec22HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2020 - Excl. 2020-2022 (variable: StpAhead_Election_2020)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2020==1
estat ic 			                                                                                                                         
predict SAElec20HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec20HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2018 - Excl. 2018-2022 (variable: StpAhead_Election_2018)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2018==1
estat ic 			                                                                                                                         
predict SAElec18HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec18HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2016- Excl. 2016-2022 (variable: StpAhead_Election_2016)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2016==1
estat ic 			                                                                                                                         
predict SAElec16HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec16HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2014 - Excl. 2014-2022 (variable: StpAhead_Election_2014)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2014==1
estat ic 			                                                                                                                         
predict SAElec14HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec14HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2012 - Excl. 2012-2022 (variable: StpAhead_Election_2012)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2012==1
estat ic 			                                                                                                                         
predict SAElec12HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec12HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2010 - Excl. 2010-2022 (variable: StpAhead_Election_2010)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2010==1
estat ic 			                                                                                                                         
predict SAElec10HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec10HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2008 - Excl. 2008-2022 (variable: StpAhead_Election_2008)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2008==1
estat ic 			                                                                                                                         
predict SAElec08HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec08HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2006 - Excl. 2006-2022 (variable: StpAhead_Election_2006)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2006==1
estat ic 			                                                                                                                         
predict SAElec06HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec06HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2004 - Excl. 2004-2022 (variable: StpAhead_Election_2004)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2004==1
estat ic 			                                                                                                                         
predict SAElec04HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec04HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2002 - Excl. 2002-2022 (variable: StpAhead_Election_2002)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2002==1
estat ic 			                                                                                                                         
predict SAElec02HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec02HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 2000 - Excl. 2000-2022 (variable: StpAhead_Election_2000)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_2000==1
estat ic 			                                                                                                                         
predict SAElec00HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec00HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1998 - Excl. 1998-2022 (variable: StpAhead_Election_1998)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1998==1
estat ic 			                                                                                                                         
predict SAElec98HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec98HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1996 - Excl. 1996-2022 (variable: StpAhead_Election_1996)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1996==1
estat ic 			                                                                                                                         
predict SAElec96HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec96HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1994 - Excl. 1994-2022 (variable: StpAhead_Election_1994)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1994==1
estat ic 			                                                                                                                         
predict SAElec94HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec94HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1992 - Excl. 1992-2022 (variable: StpAhead_Election_1992)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1992==1
estat ic 			                                                                                                                         
predict SAElec92HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec92HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1990 - Excl. 1990-2022 (variable: StpAhead_Election_1990)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1990==1
estat ic 			                                                                                                                         
predict SAElec90HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec90HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1988 - Excl. 1988-2022 (variable: StpAhead_Election_1988)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1988==1
estat ic 			                                                                                                                         
predict SAElec88HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec88HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1986 - Excl. 1986-2022 (variable: StpAhead_Election_1986)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1986==1
estat ic 			                                                                                                                         
predict SAElec86HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec86HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1984 - Excl. 1984-2022 (variable: StpAhead_Election_1984)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1984==1
estat ic 			                                                                                                                         
predict SAElec84HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec84HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1982 - Excl. 1982-2022 (variable: StpAhead_Election_1982)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1982==1
estat ic 			                                                                                                                         
predict SAElec82HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec82HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1980 - Excl. 1980-2022 (variable: StpAhead_Election_1980)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1980==1
estat ic 			                                                                                                                         
predict SAElec80HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec80HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1978 - Excl. 1978-2022 (variable: StpAhead_Election_1978)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1978==1
estat ic 			                                                                                                                         
predict SAElec78HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec78HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1976 - Excl. 1976-2022 (variable: StpAhead_Election_1976)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1976==1
estat ic 			                                                                                                                         
predict SAElec76HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec76HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1974 - Excl. 1974-2022 (variable: StpAhead_Election_1974)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1974==1
estat ic 			                                                                                                                         
predict SAElec74HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec74HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


*///  Regression Model & Information Criteria for Model Comparison: One-Step Ahead Predict 1972 - Excl. 1972-2022 (variable: StpAhead_Election_1972)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94 if StpAhead_Election_1972==1
estat ic 			                                                                                                                         
predict SAElec72HoR_TotalSeatsDEM_yhat, xb
tabstat SAElec72HoR_TotalSeatsDEM_yhat, by(ElectionDate_Y)


********************************************************************************
** #>>> 8: APPENDIX C: SUPPLEMENTARY ANALYSIS IV - WITHIN-SAMPLE ELECTION BY 
**         ELECTION FORECASTS
********************************************************************************
********************************************************************************

********************************************************************************
** >>> 8.1: SENATE: DEM RAW SEATS TOTAL WITHIN-SAMPLE ELECTION BY 
**          ELECTION SEAT FORECASTS
**          (Figure C1, Appendix C)
********************************************************************************				  
		
*///  Regression Model & Information Criteria for Model Comparison (From Table 1 in Paper, Column 1 Senate Model)
reg Senate_TotalSeats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsNotUp_DEM Election_PostVRA  
estat ic    


*/// Calculate Raw Residuals (Difference between predicted values and observed values) for Senate_TotalSeats_DEM
predict resid_Senate_TotalSeats_DEM, residuals
sum resid_Senate_TotalSeats_DEM
tab resid_Senate_TotalSeats_DEM


*/// Calculate predicted total raw seats DEM with 95% Confidence Intervals 
*###  Predict DEM Total Seats
predict Senate_TotalSeats_DEM_yhat, xb                                                                                       

*### Predict Standard Error of the Prediction DEM Total Seats Model
predict Senate_TotalSeats_DEM_errorPRED, stdp                                                                               

*### Predict DEM Total Seats Confidence Interval Lower Bound
generate Senate_TotalSeats_DEM_yhatlb = Senate_TotalSeats_DEM_yhat - invnormal(0.975)*Senate_TotalSeats_DEM_errorPRED      

*### Predict DEM Total Seats Confidence Interval Upper Bound
generate Senate_TotalSeats_DEM_yhatub = Senate_TotalSeats_DEM_yhat + invnormal(0.975)*Senate_TotalSeats_DEM_errorPRED     


*/// Predicted total raw seats DEM with 95% Confidence Intervals by Election Year
*### Predicted DEM Total Seats by Election Year (See Table CX, Appendix C)
tabstat Senate_TotalSeats_DEM_yhat, by(ElectionDate_Y)                                                                 

*### Predicted Standard Error of the Prediction DEM Total Raw Seats Model 
tabstat Senate_TotalSeats_DEM_errorPRED, by(ElectionDate_Y)                                                           

*### Predicted DEM Total Seats CI Lower Bound by Election Year
tabstat Senate_TotalSeats_DEM_yhatlb, by(ElectionDate_Y)                                                             

*### Predicted DEM Total Seats CI Upper Bound by Election Year
tabstat Senate_TotalSeats_DEM_yhatub, by(ElectionDate_Y)       


********************************************************************************
** >>> 8.2: HOUSE OF REPS: DEM RAW SEATS TOTAL WITHIN-SAMPLE ELECTION BY 
**          ELECTION SEAT FORECASTS
**          (Figure C2, Appendix C)
********************************************************************************				  
		
*///  Regression Model & Information Criteria for Model Comparison (Table 1 in Paper, Column 2 House Model)
reg HoR_Seats_DEM Dominance_DEM2 Governor_DEM StateStrength4_FirmGOP Senate_SeatsUp_Retirements_DEM Election_Post94  
estat ic                                                                                                                       
  
  
*/// Calculate Raw Residuals (Difference between predicted values and observed values) for HoR_Seats_DEM
predict resid_HoR_Seats_DEM, residuals
sum resid_HoR_Seats_DEM
tab resid_HoR_Seats_DEM


*/// Calculate predicted total raw seats DEM with 95% Confidence Intervals 
*###  Predict DEM Total Seats
predict HoR_TotalSeats_DEM_yhat, xb                                                                                       

*###  Predict Standard Error of the Prediction DEM Total Seats Model
 predict HoR_TotalSeats_DEM_errorPRED, stdp                                                                              

 *### Predict DEM Total Seats Confidence Interval Lower Bound
generate HoR_TotalSeats_DEM_yhatlb = HoR_TotalSeats_DEM_yhat - invnormal(0.975)*HoR_TotalSeats_DEM_errorPRED      

*###  Predict DEM Total Seats Confidence Interval Upper Bound
 generate HoR_TotalSeats_DEM_yhatub = HoR_TotalSeats_DEM_yhat + invnormal(0.975)*HoR_TotalSeats_DEM_errorPRED    


*/// Predicted total raw seats DEM with 95% Confidence Intervals by Election Year
*###  Predicted DEM Total Seats by Election Year (See Figure C1, Appendix C)
tabstat HoR_TotalSeats_DEM_yhat, by(ElectionDate_Y)                                                                 

*### Predicted Standard Error of the Prediction DEM Total Raw Seats Model by Election Year
tabstat HoR_TotalSeats_DEM_errorPRED, by(ElectionDate_Y)                                                           

*###  Predicted DEM Total Seats CI Lower Bound by Election Year
tabstat HoR_TotalSeats_DEM_yhatlb, by(ElectionDate_Y)                                                             

*###  Predicted DEM Total Seats CI Upper Bound by Election Year
tabstat HoR_TotalSeats_DEM_yhatub, by(ElectionDate_Y)                                                            


*/// END OF FILE 
